Área errada, movido.
- Fórum
- OTServ
- Suporte
- Tópicos Sem Resposta
- [Encerrado] Pedido De Npc
[Encerrado] Pedido De Npc
Por webmasterxd, 30 de out. de 2012 em Tópicos Sem Resposta
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

ta ae..
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function doBuyPokemonWithCasinoCoins(cid, poke) npcHandler:onSellpokemon(cid) end
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
--------------
local function checkFosseis(cid)
local poke = ""
for a = 1138, 1139 do
if not getPlayerInfoAboutPokemon(cid, oldpokedex[a-1000][1]).dex then
if a == 1139 then
poke = poke..oldpokedex[a-1000][1].."."
else
poke = poke..oldpokedex[a-1000][1]..", "
end
end
end
return poke
end
-------------------------------------
local reward = {{12222, 10}} --{ {id do item, qntdade} } // se quiser por mais itens... { {id do item, qntdade}, {id do item, qntdade} }
-------------------------------------
if getPlayerStorageValue(cid, 659896) == 1 then
selfSay("You already have help me...", cid)
talkState[cid] = 0
return false
end
if msgcontains(msg, 'help') and getPlayerStorageValue(cid, 659896) == -1 then
selfSay("You have the dex of the old pokemons Omanyte and Omastar?", cid)
talkState[cid] = 1
elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'sim')) and talkState[cid] == 1 and getPlayerStorageValue(cid, 659896) == -1 then
local check = checkFosseis(cid)
if check == "" then
selfSay("Thank you very much, take this reward...", cid)
for i = 1, #reward do
doPlayerAddItem(cid, reward[1], reward[2])
end
setPlayerStorageValue(cid, 659896, 1)
else
selfSay("You haven't this poke(s) in your pokedex yet: "..check, cid)
talkState[cid] = 0
return true
end
elseif (msgcontains(msg, 'no') or msgcontains(msg, 'nao')) then
selfSay("So good bye...", cid)
talkState[cid] = 0
return false
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

Eu tentei fazer por storage mas dava erro, acho que NPC nao aceita storage :c
info
Grupo: Campones
Registrado: 16/08/12
Posts: 92
Reputação: 0
Char no Tibia: Sedentaria

vlw Slicercomo sempre min ajudourep+
info
Grupo: Lorde
Registrado: 17/01/09
Posts: 2.1k
Reputação: +395
Char no Tibia: Adra Sata

Eu tentei fazer por storage mas dava erro, acho que NPC nao aceita storage :c
Evite FLOOD.
Reportado.
Dúvida sanada ![]()
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.






info
Grupo: Campones
Registrado: 16/08/12
Posts: 92
Reputação: 0
Char no Tibia: Sedentaria
Tava com um ideia em fazer uma guest pokemon tipo assim : O player fala com npc ai o npc pergunta se ele ja deu dex em Omanyte e Omastar Se ele tiver dado dex ele ganha um premium ou seja um item "xxxx". Se ele nao tiver o npc fala "Procure um Omanyte e Omastar e quando der dex neles volte aqui".
Editado Outubro 30 por webmasterxd